/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 *
 * @author Renato
 */
@Entity
@Table(name = "alumno", catalog = "inscripciones", schema = "", uniqueConstraints = {
    @UniqueConstraint(columnNames = {"usuario_alumno"}),
    @UniqueConstraint(columnNames = {"cuenta_alumno"})})
@NamedQueries({
    @NamedQuery(name = "Alumno.findAll", query = "SELECT a FROM Alumno a"),
    @NamedQuery(name = "Alumno.findByIdAlumno", query = "SELECT a FROM Alumno a WHERE a.idAlumno = :idAlumno"),
    @NamedQuery(name = "Alumno.findByNombreAlumno", query = "SELECT a FROM Alumno a WHERE a.nombreAlumno = :nombreAlumno"),
    @NamedQuery(name = "Alumno.findByPaternoAlumno", query = "SELECT a FROM Alumno a WHERE a.paternoAlumno = :paternoAlumno"),
    @NamedQuery(name = "Alumno.findByMaternoAlumno", query = "SELECT a FROM Alumno a WHERE a.maternoAlumno = :maternoAlumno"),
    @NamedQuery(name = "Alumno.findByEmailAlumno", query = "SELECT a FROM Alumno a WHERE a.emailAlumno = :emailAlumno"),
    @NamedQuery(name = "Alumno.findByTelefonoAlumno", query = "SELECT a FROM Alumno a WHERE a.telefonoAlumno = :telefonoAlumno"),
    @NamedQuery(name = "Alumno.findByCuentaAlumno", query = "SELECT a FROM Alumno a WHERE a.cuentaAlumno = :cuentaAlumno"),
    @NamedQuery(name = "Alumno.findByRfcAlumno", query = "SELECT a FROM Alumno a WHERE a.rfcAlumno = :rfcAlumno"),
    @NamedQuery(name = "Alumno.findByTipoAlumno", query = "SELECT a FROM Alumno a WHERE a.tipoAlumno = :tipoAlumno"),
    @NamedQuery(name = "Alumno.findByFolio", query = "SELECT a FROM Alumno a WHERE a.folio = :folio"),
    @NamedQuery(name = "Alumno.findByUsuarioAlumno", query = "SELECT a FROM Alumno a WHERE a.usuarioAlumno = :usuarioAlumno"),
    @NamedQuery(name = "Alumno.findByPasswordAlumno", query = "SELECT a FROM Alumno a WHERE a.passwordAlumno = :passwordAlumno")})
public class Alumno implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_alumno", nullable = false)
    private Integer idAlumno;
    @Basic(optional = false)
    @Column(name = "nombre_alumno", nullable = false, length = 100)
    private String nombreAlumno;
    @Basic(optional = false)
    @Column(name = "paterno_alumno", nullable = false, length = 100)
    private String paternoAlumno;
    @Basic(optional = false)
    @Column(name = "materno_alumno", nullable = false, length = 100)
    private String maternoAlumno;
    @Column(name = "email_alumno", length = 200)
    private String emailAlumno;
    @Column(name = "telefono_alumno", length = 25)
    private String telefonoAlumno;
    @Column(name = "cuenta_alumno", length = 9)
    private String cuentaAlumno;
    @Column(name = "rfc_alumno", length = 13)
    private String rfcAlumno;
    @Basic(optional = false)
    @Column(name = "tipo_alumno", nullable = false, length = 2)
    private String tipoAlumno;
    @Column(name = "folio", length = 15)
    private String folio;
    @Column(name = "usuario_alumno", length = 30)
    private String usuarioAlumno;
    @Column(name = "password_alumno", length = 30)
    private String passwordAlumno;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "alumno")
    private List<AsignacionAlumno> asignacionAlumnoList;

    public Alumno() {
    }

    public Alumno(Integer idAlumno) {
        this.idAlumno = idAlumno;
    }

    public Alumno(Integer idAlumno, String nombreAlumno, String paternoAlumno, String maternoAlumno, String tipoAlumno) {
        this.idAlumno = idAlumno;
        this.nombreAlumno = nombreAlumno;
        this.paternoAlumno = paternoAlumno;
        this.maternoAlumno = maternoAlumno;
        this.tipoAlumno = tipoAlumno;
    }

    public Integer getIdAlumno() {
        return idAlumno;
    }

    public void setIdAlumno(Integer idAlumno) {
        this.idAlumno = idAlumno;
    }

    public String getNombreAlumno() {
        return nombreAlumno;
    }

    public void setNombreAlumno(String nombreAlumno) {
        this.nombreAlumno = nombreAlumno;
    }

    public String getPaternoAlumno() {
        return paternoAlumno;
    }

    public void setPaternoAlumno(String paternoAlumno) {
        this.paternoAlumno = paternoAlumno;
    }

    public String getMaternoAlumno() {
        return maternoAlumno;
    }

    public void setMaternoAlumno(String maternoAlumno) {
        this.maternoAlumno = maternoAlumno;
    }

    public String getEmailAlumno() {
        return emailAlumno;
    }

    public void setEmailAlumno(String emailAlumno) {
        this.emailAlumno = emailAlumno;
    }

    public String getTelefonoAlumno() {
        return telefonoAlumno;
    }

    public void setTelefonoAlumno(String telefonoAlumno) {
        this.telefonoAlumno = telefonoAlumno;
    }

    public String getCuentaAlumno() {
        return cuentaAlumno;
    }

    public void setCuentaAlumno(String cuentaAlumno) {
        this.cuentaAlumno = cuentaAlumno;
    }

    public String getRfcAlumno() {
        return rfcAlumno;
    }

    public void setRfcAlumno(String rfcAlumno) {
        this.rfcAlumno = rfcAlumno;
    }

    public String getTipoAlumno() {
        return tipoAlumno;
    }

    public void setTipoAlumno(String tipoAlumno) {
        this.tipoAlumno = tipoAlumno;
    }

    public String getFolio() {
        return folio;
    }

    public void setFolio(String folio) {
        this.folio = folio;
    }

    public String getUsuarioAlumno() {
        return usuarioAlumno;
    }

    public void setUsuarioAlumno(String usuarioAlumno) {
        this.usuarioAlumno = usuarioAlumno;
    }

    public String getPasswordAlumno() {
        return passwordAlumno;
    }

    public void setPasswordAlumno(String passwordAlumno) {
        this.passwordAlumno = passwordAlumno;
    }

    public List<AsignacionAlumno> getAsignacionAlumnoList() {
        return asignacionAlumnoList;
    }

    public void setAsignacionAlumnoList(List<AsignacionAlumno> asignacionAlumnoList) {
        this.asignacionAlumnoList = asignacionAlumnoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idAlumno != null ? idAlumno.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Alumno)) {
            return false;
        }
        Alumno other = (Alumno) object;
        if ((this.idAlumno == null && other.idAlumno != null) || (this.idAlumno != null && !this.idAlumno.equals(other.idAlumno))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Alumno[idAlumno=" + idAlumno + "]";
    }

}
